#pragma once
#include "../../PatchCluster/Data/CodeBook.h"
#include "../../PatchCluster/FeatureExtract/FeatureExtract.h"
#include "RetrieverMaster.h"
#include "RetriverSlave.h"

class CRetriever
{
	CRetrieverMaster* m_threadMaster;
	CArray<CRetriverSlave*> m_arrSlaves;

public:
	CRetriever();
	virtual ~CRetriever();

	void AddFrame(int iFrameIdx, HBITMAP hBmp);

	void Start(HWND hwndNotifier, 
		CCodeBook* codeBook, 
		CFeatureExtract* extractor, 
		PatchMode patchMode = PatchModeNonOverlapped,
		int iPatchSize = 16,
		int iRegionThreshold = 4,
		char* siftKmeansModel = NULL,
		char* siftSVMModel = NULL,
		int iSlaveCnt = 3);
	void CleanUp();
};